From f36f014229fcda2eb962ac3c5355ab089777ac0a Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Mon, 20 Oct 2025 14:36:52 +0200 Subject: [PATCH] build: stop zoneinfo builder scripts changing '_' -> ' ' Zone names are correct when they contain an underscore, especially when the zone names are used as input to functions and libraries. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones e.g. Africa/Addis_Ababa Africa/Dar_es_Salaam Pacific/Port_Moresby This can be revised in future if some GUI aesthetic is required. Signed-off-by: Paul Donald --- build/zoneinfo2lua.pl | 3 ++- build/zoneinfo2ucode.pl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/zoneinfo2lua.pl b/build/zoneinfo2lua.pl index e4e637292d..c996634444 100755 --- a/build/zoneinfo2lua.pl +++ b/build/zoneinfo2lua.pl @@ -39,7 +39,8 @@ while( ! eof ZTAB ) { close ZONE; if( $tz ) { - $zone =~ s/_/ /g; + # Don't replace underscores with spaces: correct names contain underscores. + # $zone =~ s/_/ /g; $TZ{$zone} = $tz; } } diff --git a/build/zoneinfo2ucode.pl b/build/zoneinfo2ucode.pl index 941255f2f4..c902087008 100755 --- a/build/zoneinfo2ucode.pl +++ b/build/zoneinfo2ucode.pl @@ -33,7 +33,8 @@ while( ! eof ZTAB ) { close ZONE; if( $tz ) { - $zone =~ s/_/ /g; + # Don't replace underscores with spaces: correct names contain underscores. + # $zone =~ s/_/ /g; $TZ{$zone} = $tz; } } -- 2.30.2